home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.uib.no!usenet
- From: ketil@ii.uib.no (Ketil Z Malde)
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
- Subject: Re: C/C++ knocks the crap out of Ada
- Date: 20 Feb 1996 21:40:20 +0100
- Organization: II, UiB
- Sender: ketil@trost.ii.uib.no
- Message-ID: <eg3f85zq6j.fsf@trost.ii.uib.no>
- References: <00001a73+00002504@msn.com> <3114d8fb.5a455349@zesi.ruhr.de>
- <4f5h5t$f13@vixen.cso.uiuc.edu> <4g1bgf$l5@mailhub.scitec.com.au>
- <4g2vn3$rgi@dfw.dfw.net> <4g8ook$bce@mailhub.scitec.com.au>
- <nelsoni.824704449@rintintin.Colorado.EDU>
- Reply-To: ketil@ii.uib.no
- NNTP-Posting-Host: trost.ii.uib.no
- X-Newsreader: September Gnus v0.38/XEmacs 19.13
-
-
- Since, as you say, these issues are religious, here's a little
- gospelling -- hope I don't miss the mark entirely:
-
- Ian said:
-
- For imparitive programming and in general:
- * C++ is not strong typed. You can point a string to an integer
- to a float and the most you'll usually get is a compiler warning.
-
- Don't you need a cast to do this?!?
-
- * C++ functions can be anywhere. On more than one occasion I have
- had to result to using "grep" on a large directory of files because
- a programmer decided to just throw it in to a file for no obvious
- reason.
-
- This is, of course true. Use [ce]tags, or some other scheme to
- navigate your source code.
-
- * Ada makes it more clear on what parameters for functions (procedures
- and functions) do and what happens to them. It is not uncommon to
- send a pointer to a function in C++ even though the function doesn't
- change anything.
-
- ..which is why you declare it as "const" (even though I know you can
- probably still fool it)
-
- * Here is a good religious issue: C and C++ pick lousy names for the
- standard library functions and classes.
-
- Whatever.
-
- * Ada is case insensitive. C and C++ both care about the case you
- use.
-
- I care, too, so that suits me fine. Matter of taste?
-
- * There are stylistic differences. [...]
- * C++ templates and exceptions are a pretty new standard for the
- language, until recently the compiler vendor decided how to handle
- them. They aren't really in wide use yet.
-
- Hmm...I think templates are coming along nicely, at least the STL
- seems to gain some foothold, don't you think? Any compilers *still*
- not supporting templates? I doubt it.
-
- * C++ won't let you range types: a la "type year is an integer from
- -2000 to 2050" or like that.
-
- But you can easily write one yourself, and make your own choices when
- there's a tradeoff between flexibility and performance.
-
- * C++ enums are still typically just integers, is this
- changing?
-
- I believe so -- though don't bet on it.
-
- * C and C++ have macros, I don't think ada has a feature like
- that.
-
- I thought macros were bad? Anyway, I think cpp adds some nice
- features every now and again.
-
- [...]
-
- * I think I like the emacs mode for ada more than the C++ mode that I
- have.
-
- I do wish cc-mode would support highlighting template definitions as
- well, yes.
-
- -kzm
-
-